- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(keyboradWillShow:) name:UIKeyboardWillShowNotification object:nil];
    [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(keyboradWillHide:) name:UIKeyboardWillHideNotification object:nil];
}

- (void)keyboradWillShow:(NSNotification *)notification {
    NSLog(@"%@", notification.userInfo);
}

- (void)keyboradWillHide:(NSNotification *)notification {
    NSLog(@"%@", notification.userInfo);
}

- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self.view endEditing:YES];
}